﻿
/// <reference path="_namespace.js" />
/// <reference path="FlyoutWindow.js" />

/*****************************************************************************
Ajax library class definition. Kevin Robinson 2006.
Class: ajax.windows.FrameWindow 
/*****************************************************************************/


ajax.lang.addNamespace("ajax.windows");

//-----------------------------------------------------------------------------
// Define a window with an IFRAME in it
ajax.windows.FrameWindow = function(doc, sName, w, h, src, parentNode) // Constructor
{        
    ajax.windows.FrameWindow.superConstructor.call(this, doc, sName, w, h, parentNode);
        
    this.frameSrc = src;
    this.frameName = this.name + "IFrame";
                
}

//-----------------------------------------------------------------------------
ajax.lang.extend("ajax.windows.FrameWindow", "ajax.windows.FlyoutWindow"); // Inherit


//-----------------------------------------------------------------------------
ajax.windows.FrameWindow.prototype.create = function()
{        
    ajax.windows.FrameWindow.superClass.create.call(this);
            
    // Once everything gets created, pop in the IFRAME.
    var innerHTML = "<IFRAME scrolling=no frameborder=0 src=\"" + this.frameSrc + "\" name=" + this.frameName;
    innerHTML += " id=" + this.frameName + " width=" + this.width + " height=" + this.height + "></IFRAME>";
    
    this.content.innerHTML = innerHTML; 
}



//-----------------------------------------------------------------------------
ajax.windows.FrameWindow.prototype.toString = function()
{
    return "ajax.windows.FrameWindow";
}

//-----------------------------------------------------------------------------
ajax.windows.FrameWindow.prototype.toClassName = function()
{
    return ajax.lang.getClassName("ajax.windows.FrameWindow");
}

//-----------------------------------------------------------------------------
ajax.windows.FrameWindow.cast = function(obj)
{///<returns type="ajax.windows.FrameWindow"/>
    return obj;
}